//
//  PKPlarview.m
//  PianKe
//
//  Created by mingtao on 15/10/7.
//  Copyright (c) 2015年 mingtao. All rights reserved.
//

#import "PKPlarview.h"

#import <UIImageView+WebCache.h>

#import <UIButton+WebCache.h>

@implementation PKPlarview



-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _worksModelView1 = [[PKWorksModelView alloc]initWithFrame:CGRectMake(40, 220, 90, 90)];
        [self addSubview:_worksModelView1];
        
        _worksModelView2 = [[PKWorksModelView alloc]initWithFrame:CGRectMake(140, 220, 90, 90)];
        [self addSubview:_worksModelView2];
        
        _worksModelView3 = [[PKWorksModelView alloc]initWithFrame:CGRectMake(240, 220, 90, 90)];
        [self addSubview:_worksModelView3];
        
        _worksModelView4 = [[PKWorksModelView alloc]initWithFrame:CGRectMake(40, 320, 90, 90)];
        [self addSubview:_worksModelView4];
        
        _worksModelView5 = [[PKWorksModelView alloc]initWithFrame:CGRectMake(140, 320, 90, 90)];
        [self addSubview:_worksModelView5];
        
        _worksModelView6 = [[PKWorksModelView alloc]initWithFrame:CGRectMake(240, 320, 90, 90)];
        [self addSubview:_worksModelView6];
        
        
        _ButAll=[UIButton buttonWithType:(UIButtonTypeCustom)];
        _ButAll.frame = CGRectMake(200, 450, 150, 30);
        
        [_ButAll setTitle:@"查看全部电台->" forState:(UIControlStateNormal)];
        [_ButAll setTitleColor:[UIColor blackColor] forState:(UIControlStateNormal)];
        
        [self addSubview:_ButAll];
        
    }
    return self;

}

-(void)setReadiom:(PKRadiomDetailModel *)readiom
{
    _readiom = readiom;
    

}

//定义的数组

-(void)setReadimoArray:(NSArray *)ReadimoArray
{
   // PKRadiomodelMoreting *radiomodel=ReadimoArray[0];
    //Detail.userinfo[@"icon"]
    [_worksModelView1.button sd_setImageWithURL:[NSURL URLWithString:ReadimoArray[0]] forState:(UIControlStateNormal)];
    [_worksModelView2.button sd_setImageWithURL:[NSURL URLWithString:ReadimoArray[1]] forState:(UIControlStateNormal)];
    
    [_worksModelView3.button sd_setImageWithURL:[NSURL URLWithString:ReadimoArray[2]] forState:(UIControlStateNormal)];
    
    [_worksModelView4.button sd_setImageWithURL:[NSURL URLWithString:ReadimoArray[3]] forState:(UIControlStateNormal)];
    
    [_worksModelView5.button sd_setImageWithURL:[NSURL URLWithString:ReadimoArray[4]] forState:(UIControlStateNormal)];
    
    [_worksModelView6.button sd_setImageWithURL:[NSURL URLWithString:ReadimoArray[5]] forState:(UIControlStateNormal)];
    
    

}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
